﻿fl.outputPanel.clear();

var offsetY = 0	//y轴偏移量

var dom = fl.getDocumentDOM();
var lib = dom.library;
var itemsSelected = lib.getSelectedItems();
//lib.selectItem(itemsSelected[0].name);
/*lib.addItemToDocument({x:0, y:0},"attack/attack-2");
fl.getDocumentDOM().enterEditMode("inPlace"); */
var timeline = itemsSelected[6].timeline; 
//timeline.addNewLayer();

timeline.removeFrames(0, timeline.frameCount)



//for(var j=0;j<itemsSelected.length;j++){
for(var j=0;j<6;j++){
	var item = itemsSelected[j];
	if(item){
		timeline.setSelectedFrames(j, j)
		timeline.insertBlankKeyframe(j)
		timeline.setSelectedFrames(j, j)
		lib.selectItem(item.name)
		lib.addItemToDocument({x:0,y:offsetY})
	}
}